package com.ibm.cep.test.adaptor.vehicledata;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.StringReader;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.ibm.cep.constant.CEPConstant;
import com.ibm.cep.exception.CEPException;
import com.ibm.cep.pojo.bo.VehicleData;
import com.ibm.cep.service.scan.TimeManager;
import com.ibm.cep.service.vehicle.Fleet;
import com.ibm.cep.service.vehicle.parser.VehicleDataParser;
import com.ibm.cep.util.TimeUtil;
import com.ibm.cep.util.http.HttpClientHelper;

public class VehicleDataWithFilterLoaderTest {
	
//	private static final String CEP_VEHICLE_DATA_ZIP_DIR = "C:\\temp\\CEP\\vehicle_data\\CI_RWS_EACH_VEHICLE_SEP_archive\\";
//	private static final String CEP_VEHICLE_DATA_ZIP_DIR = "C:\\temp\\CEP\\vehicle_data\\CI_RWS_EACH_VEHICLE_SEP_archive_part7\\";
//	private static final String CEP_VEHICLE_DATA_ZIP_DIR = "C:\\temp\\CEP\\vehicle_data\\CI_RWS_EACH_VEHICLE_AUG_archive\\";
//	private static final String CEP_VEHICLE_DATA_ZIP_DIR = "C:\\temp\\CEP\\vehicle_data\\CI\\AUG_archive\\";
	private static final String CEP_VEHICLE_DATA_ZIP_DIR = "C:\\temp\\CEP\\vehicle_data\\CI\\NOV_archive_part8\\";

	private static final Log logger = LogFactory
	.getLog(VehicleDataWithFilterLoaderTest.class);
	
	private static VehicleDataParser parser = new VehicleDataParser();
	
	private static int fileIndex = 0;
	
	public static void main(String[] args) {
		def zipFolder = new File(CEP_VEHICLE_DATA_ZIP_DIR)
		zipFolder.eachFile {
//			if(it.name.endsWith(".zip")){
//				it.renameTo(new File(it.getParentFile(), it.name.replace("CI_", "CI_AUG_")))
//			}
//			if(it.name.indexOf("part7") > 0)
			println it.name
		}
	}


}
